#include "add_column_dialog.h"
#include "ui_add_column_dialog.h"

#include <QGraphicsDropShadowEffect>

add_column_Dialog::add_column_Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::add_column_Dialog)
{
    ui->setupUi(this);
    ui->comboBox->addItem("int");
    ui->comboBox->addItem("float");
    ui->comboBox->addItem("char");
    ui->comboBox->addItem("varchar");
    this->setAttribute(Qt::WA_TranslucentBackground, true);
    //设置无边框
    this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
    //实例阴影shadow
    QGraphicsDropShadowEffect *shadow = new QGraphicsDropShadowEffect(this);
    shadow->setOffset(0, 0);
    //设置阴影颜色
    shadow->setColor(QColor("#444444"));
    //设置阴影长度
    shadow->setBlurRadius(20);
//    给嵌套QWidget设置阴影
    ui->in_widget->setGraphicsEffect(shadow);



}

add_column_Dialog::~add_column_Dialog()
{
    delete ui;
    //设置窗体透明

}

QString add_column_Dialog::getString1(){

}
QString add_column_Dialog::getString2(){

}
void add_column_Dialog::on_buttonBox_accepted()
{

}

void add_column_Dialog::on_pushButton_clicked()
{
    emit stop(ui->lineEdit->text(),ui->comboBox->currentData().toString());
    accept();
}

void add_column_Dialog::on_pushButton_2_clicked()
{
    accept();
}
